/*
 * Copyright The OpenTelemetry Authors
 * SPDX-License-Identifier: Apache-2.0
 */

package com.xiashitech.agent.instrumentation.tomcat.valve.standardengine.inst;

import com.google.auto.service.AutoService;
import io.opentelemetry.javaagent.extension.instrumentation.InstrumentationModule;
import io.opentelemetry.javaagent.extension.instrumentation.TypeInstrumentation;

import static java.util.Arrays.asList;

import java.util.Arrays;
import java.util.List;


@AutoService(InstrumentationModule.class)
public class XSStandardEngineInstrumentationModule extends InstrumentationModule {

  public XSStandardEngineInstrumentationModule() {
    super("XSTomcat-StandardEngineValve");
  }

  @Override
  public List<TypeInstrumentation> typeInstrumentations() {
    String packageName = XSStandardEngineInstrumentationModule.class.getPackage().getName();
    return asList(new XSStandardEngineInstrumentation(packageName + ".XSStandardEngineValveAdvice"));
  }

  public List<String> getAdditionalHelperClassNames() {
    return Arrays.asList("com.xiashitech.agent.instrumentation.tomcat.common.TomcatResponseSetter",
            "com.xiashitech.agent.instrumentation.helper.calldepth.XSStandardEngineValveCallDepth");
  }
}
